package com.woniuxy.service.dto;

import com.woniuxy.entity.FoodType;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class CategoryDto {

    private Long typeId;
    private String typeName;

    public static CategoryDto from(FoodType foodType) {
        return new CategoryDto(foodType.getId(), foodType.getTypeName());
    }

}
